﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Kooboo.Commerce;

using Kooboo.IoC;

namespace Kooboo.Web.Areas.Commerce.Binders
{
    public class PromotionRuleBinder:EntityBinder
    {

        protected override object CreateModel(System.Web.Mvc.ControllerContext controllerContext, System.Web.Mvc.ModelBindingContext bindingContext, Type modelType)
        {
            var model = ObjectContainer.CreateInstance<IPromotionRule>();
            var form = controllerContext.HttpContext.Request.Form;
         

            model.KillRules = new List<IPromotionRule>();


            return model;
        }
    

       
    }
}